package win.somereason.test.baseline_web.entity;

import win.somereason.test.baseline_web.common.BaseCodeEnum;

/**
 * Created by Qingsheng.Sun on 2018/3/13.
 */
public enum CarBrand implements BaseCodeEnum {
    CHANG_AN("长安", 1),
    BEI_JING("北京", 2),
    BENZ("奔驰", 3),
    HONDA("本田", 4),
    QI_RUI("奇瑞", 5);


    // 定义私有变量
    private int nCode;
    private String name;

    // 构造函数，枚举类型只能为私有
    CarBrand(String name, int _nCode) {
        this.nCode = _nCode;
        this.name = name;
    }

    public int getValue() {
        return this.nCode;
    }

    @Override
    public String toString() {
        return this.name;
    }


}
